package com.bw.mvvm_comom.utils;

import android.content.SharedPreferences;

import com.bw.mvvm_comom.BaseApplication;

public class SpUtils {
    private static String name = "catch";

    public static void writeToken(String value){
        SharedPreferences sp = BaseApplication.getApplication().getSharedPreferences(name,0);
        sp.edit().putString("token",value).commit();
    }

    public static String readToken(){
        SharedPreferences sp = BaseApplication.getApplication().getSharedPreferences(name,0);
        return sp.getString("token","");
    }

}
